﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WomanMotion.WebApi.Model.Dtos.Contents
{
    /// <summary>
    /// 新增文章DTO
    /// </summary>
    public class CreatedContentsDTO
    {
        /// <summary>
        /// 标题
        /// </summary>
        [Required(ErrorMessage = "标题不能为空")]
        [MaxLength(50, ErrorMessage = "标题不能大于50个字符")]
        [MinLength(3, ErrorMessage = "标题不能小于3个字符")]
        public string? Title { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [Required(ErrorMessage = "内容不能为空")]
        public string? Content { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        public string? Photo { get; set; }

        /// <summary>
        /// 是否置顶;0代表置顶，1代表不置顶
        /// </summary>
        [Required(ErrorMessage = "标题不能为空")]
        public int Iftop { get; set; }
    }
}